package ooo.reindeer.data.annotation;

import ooo.reindeer.data.option.Endian;
import ooo.reindeer.data.option.Type;

import java.lang.annotation.*;

/**
 * Unsigned 8-bit integer
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@Inherited
public @interface UnsignedInt8 {

    short maxValue() default Short.MAX_VALUE;
    short miniValue() default 0;

    Type type() default Type.UnsignedInt8;

    /**
     * Endian used by codec
     *
     * @return
     */
    Endian value() default Endian.BIG;

}
